package ru.ssau.customerManagement.controller;

import ru.ssau.customerManagement.model.Model;
import ru.ssau.customerManagement.model.entities.Customer;
import ru.ssau.customerManagement.model.entities.CustomerLocation;

import java.io.*;
import java.util.Collections;
import java.util.List;

/**
 * Author: illabefat
 * Time: 02.11.2014
 */
public interface Controller {
    public Customer getCustomer(Long id);

    public void addCustomer(Customer customer) throws CreationException;

    public void replaceCustomer(Customer newCustomer);

    public void deleteCustomer(Long customerId);

    public void addCustomerLocation(CustomerLocation location) throws CreationException;

    public void replaceCustomerLocation(CustomerLocation location);

    public CustomerLocation getLocation(Long id);

    public void deleteCustomerLocation(Long customerLocationId);

    public List<CustomerLocation> getLocationsByCustomer(Long customerId);

    public List<Customer> getCustomers();

    boolean tryLockCustomer(Long id);

    void unlockCustomer(Long id);

    boolean tryLockCustomerLocation(Long id);

    void unlockCustomerLocation(Long id);
}
